package cn.edu.buu.hospital.service;

import cn.edu.buu.hospital.entity.Appointment;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface AppointmentService {
    void add(Appointment appointment);
    void removeById(Long appointmentId);
    void modify(Appointment appointment);
    Appointment findById(Long appointmentId);
    List<Appointment> findAll();
    PageInfo<Appointment> find(int pageNum, int pageSize, Appointment condition);
    PageInfo<Appointment> findByUserId(int pageNum, int pageSize, Long userId, Appointment condition);

    List<Appointment> findByVisitId(Long visitId);

    // 确认预约（状态改为已完成）
    void confirmAppointment(Long appointmentId);

    // 取消预约（状态改为已取消）
    void cancelAppointment(Long appointmentId);

    long countTodayAppointments();
    
    // 根据预约号查找预约
    Appointment findByNumber(String appointmentNo);
    
    // 根据用户ID查找预约列表
    List<Appointment> findByUserId(Long userId);
}